Page({
  data: {
    clockDay: [], // 打卡日期
  },
  onShow() {
  },
  // 签到
  flag: false,
  clockInFn() {
    if (this.flag) { my.showToast({ content: '今日已打卡了哦！' }); return; };

    let day = new Date().getTime();
    this.flag = true
    this.setData({
      clockDay: [...this.data.clockDay, day]
    })
    my.showToast({ content: "签到成功！" })
  },
  onSetClockDayFn(day) {
    if (this.flag) { my.showToast({ content: '今日已打卡了哦！' }); return; };
    this.flag = true
    this.setData({
      clockDay: [...this.data.clockDay, day]
    })
    my.showToast({ content: "签到成功！" })
  },

  onLoad() { },
});
